home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Window / c / MoveWindow < prev    next >
Text File  |  1995-07-26  |  1KB  |  36 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Window.MoveWindow.c
  12.     Author:  Copyright © 1995 Sergio Monesi
  13.     Version: 1.00 (26 Jul 1995)
  14.     Purpose: Move window by icon dragging
  15. */
  16.  
  17. #include "DeskLib:Wimp.h"
  18. #include "DeskLib:Window.h"
  19. #include "DeskLib:Error.h"
  20.  
  21. BOOL Window_MoveWindow(event_pollblock *e, void *r)
  22. {
  23.  drag_block block;
  24.  window_state state;
  25.  
  26.  Wimp_GetWindowState(e->data.mouse.window,&state);
  27.  
  28.  block.window=e->data.mouse.window;
  29.  block.type=drag_MOVEWINDOW;
  30.  block.screenrect=state.openblock.screenrect;
  31.  
  32.  Error_Check(Wimp_DragBox(&block));
  33.  
  34.  return TRUE;
  35. }
  36.